In an Internet protocol suite (Internet protocol suite), a transmission layer is located above an IP layer and below an application layer, and the existing transmission layer generally adopts the transmission control protocol (TCP, Transmission Control Protocol). The application layer sends a data stream used for inter-network transmission to the transmission layer, and then the TCP divides the data stream into data packages of appropriate lengths and transfers the data packages to the IP layer, and the IP layer transports the data packages through a network to a transmission layer of a receiving end entity. The TCP gives a serial number to each sent byte, so as to guarantee that the packages transported to the receiving end may be received in sequence.
In the foregoing data transmission process, the application layer needs to perform, through the transmission layer, data communication, and the TCP may provide a concurrent service for multiple application program processes in the application layer at the same time. Multiple application program processes may need to transmit data through the same TCP protocol port. To distinguish different application program processes, a current computer operating system provides a network socket (Socket) connection for interaction between the application program processes and the TCP/IP protocol, so as to differentiate network communication and connection of different application program processes.
A real-time hot backup processing technical solution that supports an active and standby TCP connection, which is provided by the prior art, synchronizes data between active and standby devices by adopting a TCP packet backup manner, and may keep an original TCP connection after switchover between the active and the standby devices. The process of the prior art is described as follows:
Packet data on an active board first enters an input packet backup buffer area of the active board before being sent up to a transmission control module (TCP module). After the packet that enters the input packet backup buffer area of the active board is tested to be legal, the packet in the input packet backup buffer area of the active board is sent to an input packet backup buffer area on a standby board. The input packet backup buffer areas of the active board and the standby board both send their respective cached packets up to their respective the TCP modules and application modules for processing.
The application module of the active board delivers a processed packet to an output packet backup buffer area of the active board. After the packet in the output packet backup buffer area of the active board is tested to be legal, the packet in the output packet backup buffer area of the active board is sent to an output packet backup buffer area on the standby board. The output packet backup buffers of the active board and the standby board both deliver their respective cached packets to their respective TCP modules for processing.
The packets are cached by utilizing the input packet backup buffer areas and the output packet backup buffer areas of the active board and the standby board in the process of sending up and delivering, so that statuses of the active board and the standby board are updated synchronously. In particular, when the active board has a fault, the standby board enters a main control status, and at present the standby board utilizes backup data thereof to keep the TCP connection, so as to implement non-stop routing (NSR, Non-Stop-Routing), that is, when a routing device in a local end has a fault and performs an operation of switchover between the active and the standby devices, a network neighbor device connected to the routing device does not sense that the switchover is performed between the active board and the standby board.
In the process of implementing the foregoing real-time hot backup processing technical solution that supports the active and standby TCP connection, the inventors find that the technology thereof has at least the following problems:
In the foregoing technical solution, after receiving the packet data, the active board and the standby board process the packet data on the TCP modules and the application modules respectively, because it may occur that the time is not synchronized when the active board and the standby board process data respectively, the foregoing solution cannot really implement service consistency between the active board and the standby board.